
import {Base} from '../../utils/base.js';


class Home extends Base{
  
  constructor(){
    super();
  }

  //获取banner信息
  getBannerData(id,callback){
    var params = {
      url: 'banner/' + id,
      successCallback:function(res){
        callback && callback(res.items);
      }
    }
    this.request(params);
  }

  //获取主题信息
  getThemeData(callback) {
    var params = {
      url: 'theme?ids=1,2,3&XDEBUG_SESSION_START=10836',
      successCallback: function (data) {
        callback && callback(data);
      }
    }
    this.request(params);
  }

  //获取最新商品
  getProductsData(callback) {
    var params = {
      url: 'product/recent',
      successCallback: function (data) {
        callback && callback(data);
      }
    }
    this.request(params);
  }
  
}

export{Home};